﻿CREATE TABLE [dbo].[Service_RunningJob] (
    [ServiceID]    UNIQUEIDENTIFIER NOT NULL,
    [RunningJobID] INT              NOT NULL,
    CONSTRAINT [PK_Service_RunningJob_1] PRIMARY KEY CLUSTERED ([ServiceID] ASC, [RunningJobID] ASC),
    CONSTRAINT [FK_Service_RunningJob_RunningJob] FOREIGN KEY ([RunningJobID]) REFERENCES [dbo].[RunningJob] ([RunningJobID]),
    CONSTRAINT [FK_Service_RunningJob_Service] FOREIGN KEY ([ServiceID]) REFERENCES [dbo].[Service] ([ServiceID])
);


GO
ALTER TABLE [dbo].[Service_RunningJob] NOCHECK CONSTRAINT [FK_Service_RunningJob_RunningJob];

